const nodeResolve = require('@rollup/plugin-node-resolve');
// 代码转换和压缩
const { babel } = require('@rollup/plugin-babel');
const terser = require('@rollup/plugin-terser');
// const serve = require('rollup-plugin-serve');
module.exports = {
	// 入口
	input: './src/index.js',
	// 出口
	output: {
		format: 'umd',
		name: 'pheasant-cli',
		file: './pheasant-cli/bin/index.js'
	},
	plugins: [
		nodeResolve(),
		babel({
			// polyfill
			// babelHelpers: 'pheasant-cli',
			exclude: /node_modules/
		}),
		terser()
		// serve({
		// 	port: 8080,
		// 	// open: true,
		// 	// 依赖的文件夹
		// 	contentBase: './build'
		// })
	]
};